﻿@model qltscd.Models.BaseClient.DanhMucKieu
@{
    ViewBag.Title = "SuaKieu";
    Layout = "~/Views/Shared/Modules/_LayoutDanhMucNhapLieu.cshtml";
}

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
<script>
    function submitTaoKieu(kieu) {
        document.getElementById("kieu").value = kieu;
        document.forms["TaoKieu"].submit();
    }
</script>

@using (Html.BeginForm("SuaKieu", "kieu", FormMethod.Post, new { @id = "TaoKieu" }))
{
    @Html.ValidationSummary(true)
    @Html.HiddenFor(o=>o.IdentityKieu)
    <input type="hidden" value="0" id="kieu" name="kieu" />
    <fieldset>
        <legend>Danh Mục Kiểu</legend>
        <table border="0" width="100%" cellpadding="10px" cellspacing="10px">
        <tr>
            <td style="margin-left: 10px;" class="label_col">
                Mã Kiểu
            </td>
            <td>
                @Html.TextBoxFor(model => model.MaKieu, new { @style = "width:97%;"})
                
            </td>

            <td style="margin-left: 10px;" class="label_col">
                Tên Kiểu
            </td>
            <td>
                @Html.TextBoxFor(model => model.TenKieu, new { @style = "width:97%;"})
                
            </td>
        </tr>
        <tr>
            <td style="margin-left: 10px;" class="label_col">
                Chủng loại
            </td>
            <td>
                @(Html.Telerik().ComboBox()
                    .Name("IdentityChungLoai")
                    .HtmlAttributes(new { @style = "width:97%;" })
                    .BindTo((SelectList)ViewBag.IdentityChungLoai)
                )
                
            </td>
        
            <td style="margin-left: 10px;" class="label_col">
                Hãng sản xuất
            </td>
            <td>
                @(Html.Telerik().ComboBox()
                    .Name("IdentityHangSanXuat")
                    .HtmlAttributes(new { @style = "width:97%;" })
                    .BindTo((SelectList)ViewBag.IdentityHangSanXuat)
                )
           
            </td>
        </tr>
        </table>

        @*<p>
            <input type="submit" value="Create" />
        </p>*@
    </fieldset>
    <div class="divButton">
            <input type="submit" value="Lưu" class="button" />&nbsp;
            <input type="reset" value="Nhập lại" class="button" />&nbsp;
            @Html.ActionLink("Thoát", "Index", null, new { @class = "button" })
        </div>
}

@*<div>
    @Html.ActionLink("Back to List", "Index")
</div>*@
             <div class="errBlock">
                @Html.ValidationMessageFor(model => model.MaKieu, "", new { @style = "display:block" })
                        @ViewData[qltscd.Contansts.SessionConstants.ERROR_MESSAGE]
                        <br />
                        @Html.ValidationMessageFor(model => model.TenKieu, "", new { @style = "display:block" })
                        @Html.ValidationMessageFor(model => model.IdentityChungLoai, "", new { @style = "display:block" })
                        @Html.ValidationMessageFor(model => model.IdentityHangSanXuat, "", new { @style = "display:block" })
                    </div>